package com.bigtree.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bigtree.domain.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

// 这是一个Mapper数据层,继承了mp写好的增删改查语句
@Mapper
public interface BookDao extends BaseMapper<Book> {
    //这里如果不用Mp，那么就是如下操作：

    @Select("select * from tb_book where id=#{id}")
    public Book getById1(int id);
}
